package com.xuecheng.search.service;

import com.xuecheng.commons.model.dto.CoursePubIndexDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.CoursePubIndexVo;
import com.xuecheng.commons.model.vo.ResponseResult;

import java.io.IOException;

public interface SearchService {

    // 数据同步
    void MysqlToES(Long coursePubId) throws Exception;

    // 条件分页查询
    ResponseResult<CoursePubIndexVo> search(PageRequest pageRequest, CoursePubIndexDto dto) throws IOException;

    //课程下架
    void offline(Long coursePubId) throws IOException;

    // 根据id查询课程（免费、收费）
    ResponseResult<CoursePubIndexVo> findById(String id) throws IOException;
}
